package com.hoshiicloud.withdraw.param;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.UUID;


@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "提现结果回调处理", description = "提现结果回调处理")
public class WithdrawalParam implements Serializable {

	@ApiModelProperty(value = "客户请求标识，最长32位（用户提现时企业系统自动生成，每个requestId代表一个提现请求，工猫作为每笔提现记录的唯一标识）")
	private String requestId = UUID.randomUUID().toString().replaceAll("-", "");


	@ApiModelProperty(value = "姓名")
	@NotNull(message = "姓名不能为空")
	private String name;

	@ApiModelProperty(value = "手机号")
	private String mobile;

	@ApiModelProperty(value = "提现金额")
	@NotNull(message = "提现金额不能为空")
	private BigDecimal amount;

	@ApiModelProperty(value = "身份证号码")
	@NotNull(message = "身份证号码不能为空")
	private String identity;

	@ApiModelProperty(value = "银行卡")
	@NotNull(message = "银行卡不能为空")
	private String bankAccount;

	@ApiModelProperty(value = "申请时间(yyyyMMddHHmmss)")
	private String dateTime = DateTimeFormatter.ofPattern("yyyyMMddHHmmss").format(LocalDateTime.now());

	@ApiModelProperty(value = "单据描叙,非必填")
	private String remark;

	@ApiModelProperty(value = "平台记录id")
	private String withdrawRecordId;

	@ApiModelProperty(value = "提现记录id")
	private String withdraPlatformId;
}
